#include <ne.h>
#include "TestFSM.h"
using namespace std;
using namespace ne;

int main()
{
    ne::real p = 0.0f;
    int timer = 0;
    int counter = 0;
    TestFSM *pFSM = new TestFSM(&p);
    pFSM->reset();
    Event event("TestEvent");
    while (counter < 10)
    {
        pFSM->onEvent(event);
        if (pFSM->getCurrentStateID() == FINITE_STATE_MACHINE_DEFAULT_STATE_ID)
        {
            ++timer;
            if (timer > 1)
            {
                pFSM->changeCurrentState(1, event);
                timer = 0;
            }
            ++counter;
        }
    }
    return 0;
}
